﻿
using Bee.Applications;
using Bee.Dto;
using Bee.ServiceContracts;
using System;
using System.Collections.Generic;
using System.Windows;

namespace Bee.Views
{
    /// <summary>
    /// Main.xaml 的交互逻辑
    /// </summary>
    public partial class Main : Window
    {
        private readonly string url = System.Configuration.ConfigurationSettings.AppSettings["url"].ToString();
        private ILinkCrawlerService linkCrawlerService;
        public Main()
        {
            linkCrawlerService = new LinkCrawlerTmpl();
            InitializeLoad();
            InitializeComponent();
        }

        public void InitializeLoad()
        {
            List<LinkDto> list = null;
            Func<string, List<LinkDto>> func = m =>
            {
                return linkCrawlerService.GetLinks(url);
            };
            func.BeginInvoke(url, null, null);
        }
    }
}
